use strict;
use warnings;
use Data::Dumper;
use Test::More 'no_plan';

use testsupport  ;

use_ok('Log');
use_ok('SubjectInstruction');

my $log = Log->instance();

$log->setlevels('DEBUG',3);

my $si = SubjectInstruction->new( property => 'isProp1',
				  line_begin => 5,
				  line_end  => 7 );

is(scalar(@{$si->objects}),0, "objects array is empty");

$si->addObjects(5,"value1","value2");
$si->addObjects(6,"value3","value4");
$si->addObjects(7,"value5");

$si->setModifier('lock',1);
is($si->modifiers->{'lock'},1,"lock is true");
$si->setModifier('lock',0);
is($si->modifiers->{'lock'},0,"lock is false");

my @x = ("value1","value2","value3","value4","value5");
my @y = $si->getObjects();

ok ( @y ~~ @x, "getObjects ok");

my $trace = $log->get_printable_stack();
print STDERR $trace;
$trace = $log->get_printable_filtered_stack();
print STDERR $trace;


